home *** CD-ROM | disk | FTP | other *** search
/ El Mac 1 / Magazine.iso / EL MAC 1 / Shareware / Comms. & Networking / rebecca v0.03b2 / READ ME!!!!!!!!!! < prev    next >
Encoding:
Text File  |  1995-08-26  |  7.7 KB  |  171 lines  |  [ttro/ttxt]

  1. rebeccaLib v0.03b2
  2. ©1995 Infant Software
  3. <a NKOTB production>
  4.  
  5. COMMANDS
  6.  
  7. filtermail(filterArray)
  8.  
  9. A simple function that takes a single condition and filters mail based on it.
  10. The members of the filterArray parameter are as follows:
  11.  
  12. {fromBox, toBox, searchString, criteria}
  13.  
  14. displayFilter(path_to_rules, path_to_results)
  15.  
  16. A more complex brother to filtermail. It filters based on multiple conditions and
  17. outputs the results to a file.
  18.  
  19. path_to_rules should be the path to where you have stored your filter conditions
  20. (using the addCondition command that is described below). path_to_results is the
  21. path to a text file which is used to record the date on which mail was filtered 
  22. as well as a record of how many messages where moved according to each condition. 
  23. A sample results file would look like:
  24.  
  25. Monday January 12, 1995 12:53 AM
  26. 5 messages moved from In to MyBigBox
  27. 2 messages moved from In to Trash
  28. 7 messages moved from In to MacPerlList
  29. 0 messages moved from In to MacEudoraForum
  30.  
  31. Note, that both paths should be passed as strings, so if for example, the user of
  32. your script was to choose the path to each the script line should be:
  33.  
  34. set path_to_rules to (choose file) as string
  35.  
  36. addCondition(condition_to_add, path_to_rules)
  37.  
  38. Adds a condition to your rules file.
  39.  
  40. path_to_rules is a string that contains the path the file you have your filter
  41. conditions stored in. condition_to_add is a four member array. The order of
  42. members is the same as the filterArray parameter of the filtermail command. 
  43. Each new condition is added at the beginning of the file. So the file acts as a 
  44. stack; last on, first off. addCondition writes each condition to a file as text 
  45. not as a list, so you can open your rules with BBEdit, Simple Text or whatever 
  46. and make any changes  you want. All files are written as follows:
  47.  
  48. fromBox tab toBox tab searchString tab criteria return
  49.  
  50. i.e. fromBox and a tab then the toBox et cetera.
  51.  
  52. retrieveConditions(path_to_rules)
  53.  
  54. Grabs the conditions from your rules file and returns them as an array.
  55.  
  56. path_to_rules is a string that contains the path to the fiel you have your filter
  57. conditions stored in. The array returned by retreiveConditions is in turn broken 
  58. down into a variable number of arrays of 4 members each. The number of these arrays 
  59. is equal to the number of conditions in your rules file. Below is an example of an
  60. array returned form a file with two conditions stored in it: 
  61.  
  62. {{"In", "MacPerlList", "[MacPerl]", "subject"},{"MacEudoraForum", "Trash", "unsubs", "subject"}}
  63.  
  64. To access individual members of each condition you need to specify both the member
  65. number and the condition number. For example to access the toBox of the first condition
  66. I would use something similar to:
  67.  
  68. set my2box to item 2 of item 1 of array_returned
  69.  
  70. removeCondition(ruleNumber, path_to_rules)
  71.  
  72. path_to_rules is a string that contains the path to the fiel you have your filter
  73. conditions stored in. ruleNumber is the integer value of the condition you wish
  74. to remove. Remember that the file operates similar to a stack so that the last
  75. condition added to the file is rule number 1, the next to last rule number 2, et
  76. cetera. 
  77.  
  78. OPTIMIZING YOUR FILTERING
  79.  
  80. Currently, rebeccaLib has a very primitive condition matching system. For each
  81. condition you have, it checks each message in the fromBox. This means, that if
  82. you have 4 conditions that filter mail from your In Box that each message is
  83. examined on each of four passes; assuming that it doesn't find a match on a
  84. previous pass and get moved. Therefore, your filtering will take less time if
  85. you place the conditons that move the most message at the beginning of your
  86. filterArray, have them added to your rules file last or use the reorder conditions
  87. command in HQ (see below) to move those conditions forward in the array.
  88.  
  89. ABOUT THE SAMPLE SCRIPTS AND TOOLS
  90.  
  91. Simple Filter
  92.  
  93. Demonstrates how to use the filtermail command. It filters mail on a per condition/
  94. one shot basis.
  95.  
  96. HQ
  97.  
  98. HQ, or HeadQuarters, is your way to send orders to Nikita. Through HQ you can set
  99. the number of minutes between mail checks, temporarily Suspend Nikita's activities
  100. without quitting Nikita, resume said activities, enter/delete/reorder filter conditions, and
  101. filter mail without having to wait for mail to arrive.
  102. HQ makes use of two files: 
  103. filter rules stores your filter rules as well as preferences you have set and settings HQ and Nikita
  104. set during the course of their operations. Its default location is in your preferences folder
  105. filter results is a listing of all activities undertaken by Nikita and HQ in regards to filtering mail.
  106. Its default location is in your Eudora Folder.
  107.  
  108. Nikita
  109.  
  110. Nikita is a stay open script i.e. 'an agent' that takes over from Eudora when it comes to
  111. checking for mail. When you launch Nikita, it reads in the number of minutes you have
  112. set in the Check Mail setting box and replaces it with "". Nikita then checks mail on that basis,
  113. if you wish to change the amount of time between checks, launch HQ and go to Preferences or
  114. quit out of Nikita and go into Eudora and change the time in your settings. N.B. when you quit
  115. Nikita, it sets the mail check time in Eudora to whatever Nikita was last set to. So, if for example
  116. you changed the time from 10 minutes to 15 minutes using HQ then, when you quit Nikita, 
  117. Eudora's mail check time will be 15 minutes.
  118. When Nikita spies that mail has arrived, it immediately goes to work filtering the mail. When
  119. Nikita is done, it will inform you of that arrival. In addition, information as to exsactly what was
  120. done can be obtained from you filter results file as with HQ.
  121.  
  122. Stop That!!!
  123.  
  124. A simple program that will allow you to have Eudora stop notifying any application
  125. of when mail arrives. This is particularly useful if your machine crashes and doesn't
  126. allow Nikita to run its quit procedures. Just choose an application from the dialog
  127. box presented and Stop That!!! tell Eudora NOT to notify that application of mail
  128. arriving. If you want a full blown utility of this type, I suggest getting the Eudora
  129. Notify Kit which can be obtained via anonymous ftp from:
  130.  
  131. <ftp://gaea.kgs.ukans.edu/applescript>
  132.  
  133. What you need (i.e. what I cheated with)
  134.  
  135. The following OSAXen are needed to use HQ and Nikita. All of them are from Greg Quinn's
  136. GTQLib OSAX Library. Thanks to Greg for letting me include them with the kit. Place all of
  137. the Scripting Additions in:
  138.  
  139. System Folder:Extensions:Scripting Additions:
  140.  
  141. You can obtain the entire kit by writing to me or preferably via anonymous ftp from:
  142.  
  143. <ftp://gaea.kgs.ukans.edu/applescript/OSAXEN>
  144.  
  145. In addition, you need to have the scriptable Finder.
  146.  
  147. Whats coming
  148.  
  149. Improved filtering algorithms and user settable preferences to improve speed. I recognize
  150. that speed is of essence in such operations and that rebecca fails as well as all other Applescript
  151. based solutions due. Although, some of this can be blamed on Applescripts lack of speed. A
  152. fair amount of blame can be placed with use the scriptors who don't write efficient enough
  153. AppleScript. Therefore, I will be spending alot of time on the aforementioned changes.
  154. In addition, a Scripting Addition (osax) version of rebecca will be made available which
  155. will also greatly increase speed. After these changes have been made, look for MacPerl, MacTCL,
  156. and Frontier version. Also, Zac Belado is going to write a Facespan version based on the final
  157. Nikita/HQ source code; Thanks Zac... I hate visual programming environments!!!
  158. And last but not least, the ever expensive C application that will pull it all together and kick
  159. it for speed. (Passing pointers instead of entire arrays will be a big plus all by itself) That of course 
  160. will be shareware, $5-$10 as mentioned previously, but free to anyone who helps in the
  161. development process--that means you Greg and Zac.
  162. Enjoy!
  163. Sean
  164. Infant Software
  165. runt@inch.com
  166.  
  167.  
  168.  
  169.  
  170.  
  171.